package com.dgh.school.mapper;

import com.dgh.school.bean.Affair;
import com.dgh.school.bean.Schedule;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface AffairMapper {
    @Select("select * from tb_affair")
    List<Affair> selectAll();

    //删除
    @Delete("delete from tb_affair where id=#{id}")
    void deleteAffair(int id);

    //编辑
    @Update("update tb_affair set id=#{id},taskName=#{taskName},state=#{state}")
    void updateData(Affair affair);
}
